/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidades;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author USUARIO
 */
@Entity
@Table(name = "bultos")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Bultos.findAll", query = "SELECT b FROM Bultos b"),
    @NamedQuery(name = "Bultos.findByIdBulto", query = "SELECT b FROM Bultos b WHERE b.idBulto = :idBulto"),
    @NamedQuery(name = "Bultos.findByFechaLlegada", query = "SELECT b FROM Bultos b WHERE b.fechaLlegada = :fechaLlegada"),
    @NamedQuery(name = "Bultos.findByNumBultos", query = "SELECT b FROM Bultos b WHERE b.numBultos = :numBultos"),
    @NamedQuery(name = "Bultos.findByPesoTotal", query = "SELECT b FROM Bultos b WHERE b.pesoTotal = :pesoTotal")})
public class Bultos implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_bulto")
    private Integer idBulto;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fecha_llegada")
    @Temporal(TemporalType.DATE)
    private Date fechaLlegada;
    @Basic(optional = false)
    @NotNull
    @Column(name = "num_bultos")
    private int numBultos;
    @Basic(optional = false)
    @NotNull
    @Column(name = "peso_total")
    private int pesoTotal;

    public Bultos() {
    }

    public Bultos(Integer idBulto) {
        this.idBulto = idBulto;
    }

    public Bultos(Integer idBulto, Date fechaLlegada, int numBultos, int pesoTotal) {
        this.idBulto = idBulto;
        this.fechaLlegada = fechaLlegada;
        this.numBultos = numBultos;
        this.pesoTotal = pesoTotal;
    }

    public Integer getIdBulto() {
        return idBulto;
    }

    public void setIdBulto(Integer idBulto) {
        this.idBulto = idBulto;
    }

    public Date getFechaLlegada() {
        return fechaLlegada;
    }

    public void setFechaLlegada(Date fechaLlegada) {
        this.fechaLlegada = fechaLlegada;
    }

    public int getNumBultos() {
        return numBultos;
    }

    public void setNumBultos(int numBultos) {
        this.numBultos = numBultos;
    }

    public int getPesoTotal() {
        return pesoTotal;
    }

    public void setPesoTotal(int pesoTotal) {
        this.pesoTotal = pesoTotal;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idBulto != null ? idBulto.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Bultos)) {
            return false;
        }
        Bultos other = (Bultos) object;
        if ((this.idBulto == null && other.idBulto != null) || (this.idBulto != null && !this.idBulto.equals(other.idBulto))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.Bultos[ idBulto=" + idBulto + " ]";
    }
    
}
